# How to use :
# docker build -t expm02/docker-nginx --build-arg domain=demo_domain.com .
# --------------------------------------------------------------------------------

FROM nginx:stable-alpine
ARG domain=demo_domain.com

ADD ./etc/camouflage_site.conf /etc/nginx/conf.d/camouflage_site.conf
RUN mkdir -p /etc/nginx/cert/ && \
    mv /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf.bak && \
    sed -i "s/YOUR_DOMAIN/${domain}/g" /etc/nginx/conf.d/camouflage_site.conf

EXPOSE 80
WORKDIR /etc/nginx/
